﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace LunarSF.SHomeWorkshop.LunarMarkdownEditor
{
    /// <summary>
    /// 二维文字表中列的对齐方式。
    /// </summary>
    public enum ColumnAlignment
    {
        LEFT, RIGHT, CENTER
    }

    /// <summary>
    /// 二维文字表文本行相关信息。
    /// </summary>
    public class TableLinesInfo
    {
        private bool isUsed = false;
        /// <summary>
        /// 表示是否已被处理过。
        /// </summary>
        public bool IsUsed
        {
            get { return this.isUsed; }
            set { this.isUsed = value; }
        }

        private String tableHtmlText = "";
        /// <summary>
        /// 生成的 Html 表格文本。
        /// </summary>
        public string TableHtmlText
        {
            get { return this.tableHtmlText; }
            set { this.tableHtmlText = value; }
        }

        private List<String> tableLines = new List<String>();
        /// <summary>
        /// 二维文字表各行文本。
        /// </summary>
        public List<String> TableLines
        {
            get { return tableLines; }
            set { this.tableLines = value; }
        }

        private List<ColumnAlignment> columnAlignments = new List<ColumnAlignment>();
        /// <summary>
        /// 二维文字表各列的对齐方式。
        /// </summary>
        public List<ColumnAlignment> ColumnAlignments
        {
            get { return columnAlignments; }
        }

        private int startLineIndex;
        /// <summary>
        /// 二维文字表从哪一行开始。
        /// </summary>
        public int StartLineIndex
        {
            get { return this.startLineIndex; }
            set { this.startLineIndex = value; }
        }

        private int endLineIndex;
        /// <summary>
        /// 二维文字表到哪一行结束。
        /// </summary>
        public int EndLineIndex
        {
            get { return this.endLineIndex; }
            set { this.endLineIndex = value; }
        }        
    }
}
